package com.zq.设计模式23种.创建型模式.单例模式;

/**
 * @author Jiu
 * @description：懒汉式单例模式  线程安全模式
 * @date 2020/11/24   11:01
 **/
public class SingletonLSafe {

    private static SingletonLSafe instanc;

    public SingletonLSafe() {
    }

    public static synchronized SingletonLSafe getInstance() {
        if (instanc == null) {
            instanc = new SingletonLSafe();
        }
        return instanc;
    }

}
